import Vue from 'vue'
import App from './App.vue'
import router from './routers/index'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(Element)

Vue.mixin({
  methods: {
    getAuthHeader () {
      const token = window.localStorage.getItem('shoppingToken')
      return {
        Authorization: `Bearer ${token}`
      }
    }
  }
})

Vue.config.productionTip = false

new Vue({
  render: h => h(App),
  router
}).$mount('#app')
